Skip to content

Add interactive user welcome script title#13

Open
saurabhlambe wants to merge 2 commits intomasterfrom
espanso-yaml
Open

Add interactive user welcome script title#13
saurabhlambe wants to merge 2 commits intomasterfrom
espanso-yaml

Conversation

@saurabhlambe
Copy link
Copy Markdown
Owner

@saurabhlambe saurabhlambe commented Apr 13, 2026

@coderabbitai description

Summary by CodeRabbit

  • New Features
    • Introduced a new interactive user profile setup feature that collects user information (username, full name, country, and language preference) and generates a personalized welcome message based on the provided details.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1b3e9fb9-2ae4-4903-9079-01edcb233f21

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

A new interactive script is introduced that sequentially prompts users to enter their username, full name, country, and preferred language. The script then constructs and displays a formatted welcome message incorporating these provided values.

Changes

Cohort / File(s) Summary
New User Input Collection Script
userDetails.py
New script that interactively collects four user inputs via prompts and outputs a formatted multi-line welcome message to stdout.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

Welcome to the script so new,
Four little prompts for me and you! 📝
Username, name, and country too,
A cheerful greeting—fresh and true! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title Check ✅ Passed Title check skipped as CodeRabbit has written the PR title.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch espanso-yaml

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot changed the title @coderabbitai title Add interactive user welcome script title Apr 13, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
userDetails.py (1)

2-17: Wrap input logic in a main() function with a __name__ guard to avoid side effects at import time.

Right now, if someone imports this file, they'll get stuck waiting for input—not ideal! Moving these statements into a main() function and adding the if __name__ == "__main__": guard is a great way to keep things friendly and testable.

Suggested refactor
-# Accept user inputs
-username = input("Enter your username: ")
-full_name = input("Enter your full name: ")
-country = input("Enter your country: ")
-language = input("Enter your preferred language: ")
-
-# Create and print welcome message
-message = f"""
-Welcome, {full_name}!
-
-Your username is {username}, and it's great to have someone from {country} here.
-We see that you prefer communicating in {language}, which is awesome.
-
-We're glad to have you onboard—enjoy your experience!
-"""
-
-print(message)
+def main() -> None:
+    # Accept user inputs
+    username = input("Enter your username: ")
+    full_name = input("Enter your full name: ")
+    country = input("Enter your country: ")
+    language = input("Enter your preferred language: ")
+
+    # Create and print welcome message
+    message = f"""
+Welcome, {full_name}!
+
+Your username is {username}, and it's great to have someone from {country} here.
+We see that you prefer communicating in {language}, which is awesome.
+
+We're glad to have you onboard—enjoy your experience!
+"""
+    print(message)
+
+
+if __name__ == "__main__":
+    main()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@userDetails.py` around lines 2 - 17, Wrap the top-level input and printing
code into a main() function so imports won’t trigger interactive prompts: move
username, full_name, country, language, the message formatting variable, and the
print(message) call into def main(): and then add an if __name__ == "__main__":
main() guard so the module is import-safe and testable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@userDetails.py`:
- Line 14: Replace the smart apostrophe in the string literal "We’re glad to
have you onboard—enjoy your experience!" with a plain ASCII apostrophe to
satisfy lint rule RUF001; locate the exact string in userDetails.py (the
greeting message) and change “We’re” to "We're" ensuring no other Unicode
punctuation remains in that literal.

---

Nitpick comments:
In `@userDetails.py`:
- Around line 2-17: Wrap the top-level input and printing code into a main()
function so imports won’t trigger interactive prompts: move username, full_name,
country, language, the message formatting variable, and the print(message) call
into def main(): and then add an if __name__ == "__main__": main() guard so the
module is import-safe and testable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2d2d8865-e8cb-47a2-ac0f-96ea4730f066

📥 Commits

Reviewing files that changed from the base of the PR and between 5eadc45 and 3b7345b.

📒 Files selected for processing (1)
  • userDetails.py

Comment thread userDetails.py Outdated
Your username is {username}, and it's great to have someone from {country} here.
We see that you prefer communicating in {language}, which is awesome.

We’re glad to have you onboard—enjoy your experience!
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Tiny lint fix needed on Line 14 (RUF001).
The smart quote in We’re is flagged as an ambiguous Unicode character; swap it to plain ASCII to keep lint clean.

Quick fix
-We’re glad to have you onboard—enjoy your experience!
+We're glad to have you onboard—enjoy your experience!
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Were glad to have you onboardenjoy your experience!
We're glad to have you onboardenjoy your experience!
🧰 Tools
🪛 Ruff (0.15.9)

[warning] 14-14: String contains ambiguous (RIGHT SINGLE QUOTATION MARK). Did you mean ``` (GRAVE ACCENT)?

(RUF001)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@userDetails.py` at line 14, Replace the smart apostrophe in the string
literal "We’re glad to have you onboard—enjoy your experience!" with a plain
ASCII apostrophe to satisfy lint rule RUF001; locate the exact string in
userDetails.py (the greeting message) and change “We’re” to "We're" ensuring no
other Unicode punctuation remains in that literal.

@saurabhlambe
Copy link
Copy Markdown
Owner Author

@coderabbitai autofix

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 13, 2026

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

Files modified:

  • userDetails.py

Commit: 9dc2451a84bd5a766d77804ebd45c548373bf700

The changes have been pushed to the espanso-yaml branch.

Time taken: 1m 5s

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant